define([ "PDUtilDir/grid", "PDUtilDir/searchBlock" ],
		function(Grid, SearchBlock) {

			function init(addObj, updateObj, delObj, searchObj) {
				SearchBlock.init('searchBlockId');
				// 初始化
				return Grid({
					id : "DriverGirdDivId",
					pageSize : 10,
					index : true,
					multi : true,
					pagination : true,
					cache : false,
					layout : [ {
						name : "姓名",
						field : "name",
						sort : true,
						click : function(e) {
							updateObj.run(e.data.row);
						}
					}, {
						name : "代码",
						field : "code",
						sort : true
					}, {
						name : "性别",
						field : "sex"
					}, {
						name : "年龄",
						field : "age"
					}, {
						name : "联系电话",
						field : "phone"
					}, {
						name : "身份证",
						field : "cardId"
					}, {
						name : "状态",
						field : "status"
					} ],
					toolbar : [ {
						name : "添加",
						icon : "fa fa-plus-circle",
						callback : function(event) {
							addObj.run();
						}
					}, {
						name : "删除",
						icon : "fa fa-trash-o",
						callback : function(event) {
							delObj.run();
						}
					}, {
						name : "查询",
						icon : "fa fa-search",
						callback : function(event) {
						    searchObj.run();
						}
					} ],
					data : {
						type : 'URL',
						value : getServer()
								+ '/flea/hclv/driver/selectByDeptId.htmls'
					},
					queryParam : {
						name : "",
						type : ""
					}
				});
			}

			return {
				init : init
			}
		});